package org.aphelie.torg.ruler.protagonists.actions;

import org.eclipse.jface.action.IAction;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.ui.IObjectActionDelegate;
import org.eclipse.ui.IViewActionDelegate;
import org.eclipse.ui.IViewPart;
import org.eclipse.ui.IWorkbenchPart;

public class AddToProtagonistsActionDelegate implements IObjectActionDelegate, IViewActionDelegate {

	private IWorkbenchPart targetPart;
	
	public void init(IViewPart view) {
		this.targetPart = view;
	}
	
	@Override
	public void run(IAction action) {
		// TODO
		MessageDialog.openInformation(
				targetPart.getSite().getShell(), 
				"Add to Protagonists", 
				"Triggered the " + getClass().getName() +  " action.");
 	}

	@Override
	public void selectionChanged(IAction action, ISelection selection) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void setActivePart(IAction action, IWorkbenchPart targetPart) {
		this.targetPart = targetPart;
		
	}



}
